<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> 卸载事件 </title>
<script type="text/javascript">  
     window.onUnload = onunload_message();
     function onunload_message(){  
       // alert("您确定离开该网页吗？");
    }

    function test(){
      fun1();
      fun2();
    }

    //window.onload=test();
     //window.onload = function(){alert(123);}
    //window.onload=function(){alert(1111)};
</script>  
</head>
<body  onload="alert(1)" onmove="alert(222)">
  欢迎学习JavaScript。

<a href="http://www.baidu.com">跳出</a>
</body>
</html>

